package kr.hkit.powerjava.chapter07;

public class Car2 {

	private String color;
	private int speed;
	private int gear;

	public Car2(String color, int speed, int gear) {
		super();
		this.color = color;
		this.speed = speed;
		this.gear = gear;
	}

	public Car2() {
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}

	public int getGear() {
		return gear;
	}

	public void setGear(int gear) {
		this.gear = gear;
	}

	@Override
	public String toString() {
		return "Car2 [color=" + color + ", speed=" + speed + ", gear=" + gear
				+ "]";
	}

	public static void main(String[] args) {
		Car2 myCar2 = new Car2("red", 100, 6);
		System.out.println(myCar2);
	}
}
